<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>cat writebug.cn/history</title>
  <meta name="author" content="zhiliao">
  <meta name="description" content="writebug博客网，一个开发者的技术博客。" />

  <meta name="keywords" content="开发者,程序,博客园,程序猿,程序媛,极客,码农,编程,代码,软件开发,开源,IT网站,技术社区,Developer,Programmer,Coder,Geek,Coding,Code,writebug,bug,写bug,linux,vim,编程语言,调试" />

  <link href="/feeds/all.atom.xml" type="application/rss+xml" rel="alternate"
        title="cat writebug.cn/history RSS Feed" />



  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">


    <link href="/favicon.png" rel="icon">

  <link href="/theme/css/main.css" media="screen, projection"
        rel="stylesheet" type="text/css">
  <link href="/theme/css/pygment.css" rel="stylesheet" type="text/css">

  <!--
  <link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  <link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  -->


  <script src="/theme/js/modernizr-2.0.js"></script>
  <script src="/theme/js/ender.js"></script>
  <script src="/theme/js/octopress.js" type="text/javascript"></script>
</head>

<body >
  <header role="banner"
  >
<hgroup>
  <h1><a href="/">cat writebug.cn/history</a></h1>
    <h2>一个开发者的技术博客。</h2>
</hgroup></header>
  <nav role="navigation"><ul class="subscription" data-subscription="rss">
  <li><a href="/feeds/all.atom.xml" rel="subscribe-rss">RSS</a></li>
</ul>


<ul class="main-navigation">
    <li><a href="/">Home</a></li>
    <li><a href="/archives.html">Archive</a></li>
    <li><a href="/pages/todolist.html">TodoList</a></li>
    <li><a href="/pages/about.html">About</a></li>
</ul></nav>
  <div id="main">
    <div id="content">
<div class="blog-index">
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/08/22/bash-conversion.html">bash进制转换</a>
      </h1>
    <p class="meta">
<time datetime="2023-08-22T22:36:44+08:00" pubdate>2023-08-22 22:36:44</time>      
    </p>
</header>

        <div class="entry-content"><ol>
<li>在let命令和 <code>$(( 表达式 ))</code>中，支持 前缀为0的八进制数， 支持前缀是0x的十六进制数字， 支持2到64进制，使用<code>[base#]n</code>表示， base是2到 …</li></ol></div>
            <footer>
                <a rel="full-article" href="/posts/2023/08/22/bash-conversion.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/08/16/remap-caps-ctrl.html">在Linux下交换Ctrl与大写锁定键</a>
      </h1>
    <p class="meta">
<time datetime="2023-08-16T22:44:54+08:00" pubdate>2023-08-16 22:44:54</time>      
    </p>
</header>

        <div class="entry-content"><p>备注： <code>不要在虚拟机里交换按键</code></p>
<ol>
<li>GNOME3 用户可以使用Tweaks工具交换大写锁定和Ctrl键。</li>
</ol>
<div class="highlight-custom"><pre><span></span><code>启动 Tweaks 程序。
从左侧菜单中选择 “Keyboard &amp; Mouse”。
单击 “Additional …</code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2023/08/16/remap-caps-ctrl.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/08/15/learn-java.html">java入门精粹</a>
      </h1>
    <p class="meta">
<time datetime="2023-08-15T00:52:44+08:00" pubdate>2023-08-15 00:52:44</time>      
    </p>
</header>

        <div class="entry-content"><h2>第一章 java开发入门</h2>
<ol>
<li>java类只支持单继承，但接口之间支持多继承。</li>
<li>jdk包括java编译器，java运行时，java文档工具，java打包工具等。</li>
<li>jdk安 …</li></ol></div>
            <footer>
                <a rel="full-article" href="/posts/2023/08/15/learn-java.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/08/04/tcl-expect.html">Tcl 和 expect教程</a>
      </h1>
    <p class="meta">
<time datetime="2023-08-04T22:08:51+08:00" pubdate>2023-08-04 22:08:51</time>      
    </p>
</header>

        <div class="entry-content"><h1>expect</h1>
<p>expect是用于命令行自动化交互的程序，相当于命令行版本的按键精灵。可以用来输入密码，操作程序。</p>
<ul>
<li>expect基于Tcl/Tk实现，在expect …</li></ul></div>
            <footer>
                <a rel="full-article" href="/posts/2023/08/04/tcl-expect.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/08/01/armbian-config-software.html">armbian-config 支持自动安装的软件</a>
      </h1>
    <p class="meta">
<time datetime="2023-08-01T21:18:49+08:00" pubdate>2023-08-01 21:18:49</time>      
    </p>
</header>

        <div class="entry-content"><h5>发现armbian-config-software里面带的软件比较实用。有些工具值得尝试。在这里记录下armbian-config支持的软件列表。</h5>
<ul>
<li><a href="https://tvheadend.org/">TV headend</a> <em>(IPTV server)</em></li>
<li><a href="https://syncthing.net/">Syncthing</a> <em>(personal cloud)</em></li>
<li><a href="https://www.softether.org/">SoftEther VPN server</a> <em>(VPN server)</em></li>
<li><a href="https://www.plex.tv/">Plex</a> <em>(Plex media …</em></li></ul></div>
            <footer>
                <a rel="full-article" href="/posts/2023/08/01/armbian-config-software.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/07/31/rsync.html">rsync基本使用方法</a>
      </h1>
    <p class="meta">
<time datetime="2023-07-31T01:29:08+08:00" pubdate>2023-07-31 01:29:08</time>      
    </p>
</header>

        <div class="entry-content"><h2>rsync介绍</h2>
<p>rsync是快速和通用的远程和本地文件同步工具。</p>
<p>支持通过远程shell或者rsnyc守护进程进行同步。经常用作备份和镜像的 …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2023/07/31/rsync.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/07/30/file-sync-tools-compare.html">文件同步工具对比</a>
      </h1>
    <p class="meta">
<time datetime="2023-07-30T23:04:24+08:00" pubdate>2023-07-30 23:04:24</time>      
    </p>
</header>

        <div class="entry-content"><ol>
<li>
<p>FreeFileSync # 操作非常简单，图形化界面方式使用，支持Windows, Linux，Mac， 支持sftp,ftp协议</p>
</li>
<li>
<p>Syncthing # 支持多客户端一起同步，p2p，支持大多数操作系统，支持 …</p></li></ol></div>
            <footer>
                <a rel="full-article" href="/posts/2023/07/30/file-sync-tools-compare.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/07/29/gdb.html">gdb的基本使用方法</a>
      </h1>
    <p class="meta">
<time datetime="2023-07-29T00:26:32+08:00" pubdate>2023-07-29 00:26:32</time>      
    </p>
</header>

        <div class="entry-content"><h1>获取进程的coredump （内核转储）</h1>
<h2>启用内核转储</h2>
<table>
<thead>
<tr>
<th>功能</th>
<th>命令</th>
</tr>
</thead>
<tbody>
<tr>
<td>查看coredump功能是否有效</td>
<td><code>ulimit</code>和<code>ulimit -c</code></td>
</tr>
<tr>
<td>开启内核转储</td>
<td>ulimit -c unlimited</td>
</tr>
<tr>
<td>设置coredump大小上限</td>
<td>ulimit …</td></tr></tbody></table></div>
            <footer>
                <a rel="full-article" href="/posts/2023/07/29/gdb.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2023/07/15/diff-patch.html">diff和patch命令以及git patch相关操作</a>
      </h1>
    <p class="meta">
<time datetime="2023-07-15T01:29:18+08:00" pubdate>2023-07-15 01:29:18</time>      
    </p>
</header>

        <div class="entry-content"><h3>diff命令</h3>
<div class="highlight-custom"><pre><span></span><code>-行数  指定要显示多少行的文本。此参数必须与-c或-u参数一并使用。
-a 所有的文件都视为文本文件来逐行比较, 包 …</code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2023/07/15/diff-patch.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/12/29/install-cgit.html">debian11-bullseye install cgit</a>
      </h1>
    <p class="meta">
<time datetime="2022-12-29T22:50:18+08:00" pubdate>2022-12-29 22:50:18</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code>apt<span class="w"> </span>update
apt<span class="w"> </span>install<span class="w"> </span>cgit
dpkg<span class="w"> </span>--status<span class="w"> </span>cgit
<span class="c1"># install Recommends</span>
apt<span class="w"> </span>install<span class="w"> </span>apache2<span class="w"> </span>python3-docutils<span class="w"> </span>python3-markdown<span class="w"> </span>python3-pygments

<span class="nb">cd</span><span class="w"> </span>/etc/apache2/conf-enabled
ln<span class="w"> </span>-s<span class="w"> </span>../conf-available/cgit.conf<span class="w"> </span>git.conf

<span class="nb">cd</span><span class="w"> </span>/etc/apache2/mods-enabled
ln<span class="w"> </span>-s<span class="w"> </span>../mods-available/cgi.load<span class="w"> </span>cgi.load

systemctl<span class="w"> </span>restart<span class="w"> </span>apache2


<span class="c1"># cp -r /usr/share/git-core/templates ~/git-template</span>
<span class="c1"># cd ~/git-template …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2022/12/29/install-cgit.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/11/05/raspbian10-raspios-selenium.html">raspberry-debian10-selenium测试</a>
      </h1>
    <p class="meta">
<time datetime="2022-11-05T18:40:04+08:00" pubdate>2022-11-05 18:40:04</time>      
    </p>
</header>

        <div class="entry-content"><p>测试环境 <code>Raspbian GNU/Linux 10 (buster)</code></p>
<p>经过搜索发现firefox的geckodriver官方不支持arm. 所以只能选择chromium浏览器.</p>
<h4>安装依赖</h4>
<div class="highlight-custom"><pre><span></span><code>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>python3-selenium
sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>python3-pyvirtualdisplay<span class="w"> </span><span class="c1"># 由于raspberry没 …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2022/11/05/raspbian10-raspios-selenium.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/11/05/raspbian10-raspios-selenium-har.html">raspberry-debian10-selenium-har测试</a>
      </h1>
    <p class="meta">
<time datetime="2022-11-05T18:40:04+08:00" pubdate>2022-11-05 18:40:04</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="n">nohup</span> <span class="o">./</span><span class="n">browsermob</span><span class="o">-</span><span class="n">proxy</span> <span class="o">--</span><span class="n">port</span> <span class="mi">9090</span> <span class="o">&amp;</span>

<span class="kn">from</span> <span class="nn">browsermobproxy</span> <span class="kn">import</span> <span class="n">Server</span>

<span class="n">server</span> <span class="o">=</span> <span class="n">Server</span><span class="p">(</span><span class="s2">&quot;/data/.workspace/selenium/browsermob-proxy-2.1.4/bin/browsermob-proxy&quot;</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;port&quot;</span><span class="p">:</span><span class="mi">9090</span><span class="p">})</span>
<span class="n">server</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="n">proxy</span> <span class="o">=</span> <span class="n">server</span><span class="o">.</span><span class="n">create_proxy</span><span class="p">()</span>


<span class="kn">from</span> <span class="nn">pyvirtualdisplay</span> <span class="kn">import</span> <span class="n">Display</span>
<span class="kn">from</span> <span class="nn">selenium</span> <span class="kn">import</span> <span class="n">webdriver</span>

<span class="n">display</span> <span class="o">=</span> <span class="n">Display</span><span class="p">(</span><span class="n">visible</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="p">(</span><span class="mi">1024</span><span class="p">,</span> <span class="mi">768</span><span class="p">))</span>
<span class="n">display</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># 开启虚拟GUI …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2022/11/05/raspbian10-raspios-selenium-har.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/09/03/alternativeto.html">代替品查询网站</a>
      </h1>
    <p class="meta">
<time datetime="2022-09-03T16:57:51+08:00" pubdate>2022-09-03 16:57:51</time>      
    </p>
</header>

        <div class="entry-content"><p><a href="https://alternativeto.net/">alternativeto</a></p></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/09/03/Flatpak-vs-Snap.html">Flatpak vs Snap</a>
      </h1>
    <p class="meta">
<time datetime="2022-09-03T12:59:46+08:00" pubdate>2022-09-03 12:59:46</time>      
    </p>
</header>

        <div class="entry-content"><h2>Flatpak vs. Snap</h2>
<p>Flatpak may have been in works since 2007 as glick, it’s not the only player in the Linux world. Canonical is the one that created waves with the announcement of Click, that later evolved into Snap.</p>
<p>There is a healthy competition between the two projects and …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2022/09/03/Flatpak-vs-Snap.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/07/09/interview-questions.html">面试中我经常问的问题</a>
      </h1>
    <p class="meta">
<time datetime="2022-07-09T01:12:10+08:00" pubdate>2022-07-09 01:12:10</time>      
    </p>
</header>

        <div class="entry-content"><h3>C++</h3>
<ol>
<li>说说C++的类型转换和使用场景。</li>
<li>什么是抽象类。怎么定义。</li>
<li>说说C++的新特性。</li>
<li>C 和 C++ struct区别？</li>
<li>volatile作用， 是否具有原子性？</li>
<li>如何禁 …</li></ol></div>
            <footer>
                <a rel="full-article" href="/posts/2022/07/09/interview-questions.html">Read On &crarr;</a>
            </footer>
  		</article>
<div class="pagination">
    <a class="prev" href="/index2.html">&larr; Older</a>

  <br />
</div></div>

<aside class="sidebar">
<section>
  <h1>Recent Posts</h1>
  <ul id="recent_posts">
    <li class="post">
        <a href="/posts/2023/08/22/bash-conversion.html">bash进制转换</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/16/remap-caps-ctrl.html">在Linux下交换Ctrl与大写锁定键</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/15/learn-java.html">java入门精粹</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/04/tcl-expect.html">Tcl 和 expect教程</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/01/armbian-config-software.html">armbian-config 支持自动安装的软件</a>
    </li>
  </ul>
</section><section>
  <h1>Categories</h1>
    <ul id="recent_posts">
      <li><a href="/category/android.html">android (2)</a></li>
      <li><a href="/category/blog.html">blog (1)</a></li>
      <li><a href="/category/bootloader.html">bootloader (2)</a></li>
      <li><a href="/category/container.html">container (1)</a></li>
      <li><a href="/category/database.html">database (1)</a></li>
      <li><a href="/category/editor.html">editor (4)</a></li>
      <li><a href="/category/filesystem.html">filesystem (1)</a></li>
      <li><a href="/category/firefox.html">firefox (1)</a></li>
      <li><a href="/category/git.html">git (4)</a></li>
      <li><a href="/category/golang.html">golang (1)</a></li>
      <li><a href="/category/gu-piao.html">股票 (1)</a></li>
      <li><a href="/category/ide.html">IDE (1)</a></li>
      <li><a href="/category/interview.html">interview (1)</a></li>
      <li><a href="/category/linux.html">linux (51)</a></li>
      <li><a href="/category/network.html">network (7)</a></li>
      <li><a href="/category/nltk.html">nltk (2)</a></li>
      <li><a href="/category/notes.html">notes (1)</a></li>
      <li><a href="/category/other.html">other (1)</a></li>
      <li><a href="/category/programming.html">programming (10)</a></li>
      <li><a href="/category/python.html">python (1)</a></li>
      <li><a href="/category/software.html">software (1)</a></li>
      <li><a href="/category/stock.html">stock (1)</a></li>
      <li><a href="/category/storage.html">storage (2)</a></li>
      <li><a href="/category/vm.html">vm (1)</a></li>
      <li><a href="/category/web.html">web (4)</a></li>
      <li><a href="/category/windows.html">windows (1)</a></li>
      <li><a href="/category/xwindow.html">xwindow (1)</a></li>
  </ul>
</section>
<section>
  <h1>Tags</h1>
    <a href="/tag/linux.html">linux</a>,    <a href="/tag/bash.html">bash</a>,    <a href="/tag/xwindow.html">Xwindow</a>,    <a href="/tag/programming-language.html">programming-language</a>,    <a href="/tag/java.html">java</a>,    <a href="/tag/programming.html">programming</a>,    <a href="/tag/software.html">software</a>,    <a href="/tag/storage.html">storage</a>,    <a href="/tag/debug.html">debug</a>,    <a href="/tag/c.html">C</a>,    <a href="/tag/git.html">git</a>,    <a href="/tag/patch.html">patch</a>,    <a href="/tag/text.html">text</a>,    <a href="/tag/selenium.html">selenium</a>,    <a href="/tag/web.html">web</a>,    <a href="/tag/docker.html">docker</a>,    <a href="/tag/flatpak.html">flatpak</a>,    <a href="/tag/interview.html">interview</a>,    <a href="/tag/qt.html">Qt</a>,    <a href="/tag/opensuse.html">openSUSE</a>,    <a href="/tag/filesystem.html">filesystem</a>,    <a href="/tag/ide.html">IDE</a>,    <a href="/tag/glang.html">glang</a>,    <a href="/tag/xdg.html">xdg</a>,    <a href="/tag/network.html">network</a>,    <a href="/tag/raspberry.html">raspberry</a>,    <a href="/tag/vm.html">vm</a>,    <a href="/tag/windows.html">windows</a>,    <a href="/tag/gdb.html">gdb</a>,    <a href="/tag/debian.html">debian</a>,    <a href="/tag/archlinux.html">archlinux</a>,    <a href="/tag/phicomm.html">phicomm</a>,    <a href="/tag/kernel.html">kernel</a>,    <a href="/tag/ext4.html">ext4</a>,    <a href="/tag/server.html">server</a>,    <a href="/tag/stock.html">stock</a>,    <a href="/tag/shu.html">书</a>,    <a href="/tag/gu-piao.html">股票</a>,    <a href="/tag/python.html">python</a>,    <a href="/tag/nltk.html">nltk</a>,    <a href="/tag/command.html">command</a>,    <a href="/tag/shell.html">shell</a>,    <a href="/tag/terminal.html">terminal</a>,    <a href="/tag/other.html">other</a>,    <a href="/tag/wireless.html">wireless</a>,    <a href="/tag/android.html">android</a>,    <a href="/tag/gtk.html">gtk+</a>,    <a href="/tag/gnome.html">gnome</a>,    <a href="/tag/keyboard.html">keyboard</a>,    <a href="/tag/firefox.html">firefox</a>,    <a href="/tag/arch.html">arch</a>,    <a href="/tag/database.html">database</a>,    <a href="/tag/mysql.html">mysql</a>,    <a href="/tag/notes.html">notes</a>,    <a href="/tag/sysctl.html">sysctl</a>,    <a href="/tag/vim.html">vim</a>,    <a href="/tag/editor.html">editor</a>,    <a href="/tag/pelican.html">pelican</a>,    <a href="/tag/blog.html">blog</a>,    <a href="/tag/book.html">book</a>,    <a href="/tag/bootloader.html">bootloader</a></section>
    <section>
        <h1>Social</h1>
        <ul>
            <li><a href="https://github.com/zhangjiaxing" target="_blank">github</a></li>
            <li><a href="http://wpa.qq.com/msgrd?v=3&uin=347820393&site=qq&menu=yes" target="_blank">qq</a></li>
            <li><a href="http://www.writebug.cn" target="_blank">blog</a></li>
            <li><a href="http://gallery.writebug.cn" target="_blank">gallery</a></li>
        </ul>
    </section>
    <section>
        <h1>Blogroll</h1>
        <ul>
            <li><a href="http://getpelican.com/" target="_blank">Pelican</a></li>
        </ul>
    </section>

</aside>
    </div>
  </div>
  <footer role="contentinfo">
<p>
    Copyright &copy;  2013&ndash;2023  zhiliao &mdash;
  <span class="credit">Powered by <a href="http://getpelican.com">Pelican</a></span>
</p>  </footer>
</body>
</html>